<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>perms</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 07/11/2006</div>
    <p>
      <b>perms</b> - returns all permutations of a vector
  components</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>y=perms(x)</tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>x</b>
        </tt>: a scalar or a vector.</li>
      <li>
        <tt>
          <b>y</b>
        </tt>: a scalar or a matrix.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>Given a vector <tt>
        <b>x</b>
      </tt> of length <tt>
        <b>n</b>
      </tt>,the function
    <tt>
        <b>perms</b>
      </tt> returns all the permutations of <tt>
        <b>x</b>
      </tt>. The
    size of<tt>
        <b> y</b>
      </tt> is <tt>
        <b>n!</b>
      </tt> x <tt>
        <b>n</b>
      </tt>.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>// example 1:
x=[4 7 10];
y=perms(x)

// example 2:
x=[1 5 2 5];
y=perms(x)</pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="permute.htm">
        <tt>
          <b>permute</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>Farid Belahcene</p>
  </body>
</html>
